package robocup.component.speechacts.coachlanguage;

public class ActionElement {

  private TypeConstants.ACTIONTYPE actionType    = TypeConstants.ACTIONTYPE.INIT;

  private String                   actionName    = "";

  private Region                   posRegion     = null;

  private Region                   homeRegion    = null;

  private UnumSet                  markUnumSet   = null;

  private UnumSet                  marklUnumSet  = null;

  private Region                   marklRegion   = null;

  private Region                   olineRegion   = null;

  private int                      htypeInt      = 0;

  private Region                   passRegion    = null;

  private UnumSet                  passUnumSet   = null;

  private Region                   dribbleRegion = null;

  private Region                   clearRegion   = null;

  private UnumSet                  tackelUnumSet = null;

  private Bto                      bto           = null;

  public Bto getBto() {

    return this.bto;
  }

  public void setBto(final Bto bto) {

    this.bto = bto;
  }

  public TypeConstants.ACTIONTYPE getActionType() {

    return this.actionType;
  }

  public void setActionType(final TypeConstants.ACTIONTYPE actionType) {

    this.actionType = actionType;
  }

  public String getActionName() {

    return this.actionName;
  }

  public void setActionName(final String actionName) {

    this.actionName = actionName;
  }

  public Region getClearRegion() {

    return this.clearRegion;
  }

  public void setClearRegion(final Region clearRegion) {

    this.clearRegion = clearRegion;
  }

  public Region getDribbleRegion() {

    return this.dribbleRegion;
  }

  public void setDribbleRegion(final Region dribbleRegion) {

    this.dribbleRegion = dribbleRegion;
  }

  public Region getHomeRegion() {

    return this.homeRegion;
  }

  public void setHomeRegion(final Region homeRegion) {

    this.homeRegion = homeRegion;
  }

  public int getHtypeInt() {

    return this.htypeInt;
  }

  public void setHtypeInt(final int htypeInt) {

    this.htypeInt = htypeInt;
  }

  public Region getMarklRegion() {

    return this.marklRegion;
  }

  public void setMarklRegion(final Region marklRegion) {

    this.marklRegion = marklRegion;
  }

  public UnumSet getMarklUnumSet() {

    return this.marklUnumSet;
  }

  public void setMarklUnumSet(final UnumSet marklUnumSet) {

    this.marklUnumSet = marklUnumSet;
  }

  public UnumSet getMarkUnumSet() {

    return this.markUnumSet;
  }

  public void setMarkUnumSet(final UnumSet markUnumSet) {

    this.markUnumSet = markUnumSet;
  }

  public Region getOlineRegion() {

    return this.olineRegion;
  }

  public void setOlineRegion(final Region olineRegion) {

    this.olineRegion = olineRegion;
  }

  public Region getPassRegion() {

    return this.passRegion;
  }

  public void setPassRegion(final Region passRegion) {

    this.passRegion = passRegion;
  }

  public UnumSet getPassUnumSet() {

    return this.passUnumSet;
  }

  public void setPassUnumSet(final UnumSet passUnumSet) {

    this.passUnumSet = passUnumSet;
  }

  public UnumSet getTackelUnumSet() {

    return this.tackelUnumSet;
  }

  public void setTackelUnumSet(final UnumSet tackelUnumSet) {

    this.tackelUnumSet = tackelUnumSet;
  }

  public Region getPosRegion() {

    return this.posRegion;
  }

  public void setPosRegion(final Region posRegion) {

    this.posRegion = posRegion;
  }

  @Override
  public String toString() {

    final StringBuffer buf = new StringBuffer();

    switch (this.actionType) {

      case INIT:
        buf.append("(empty action)");
        break;

      case POS:
        buf.append("(pos " + this.posRegion.toString() + ")");
        break;

      case HOME:
        buf.append("(home " + this.homeRegion.toString() + ")");
        break;

      case MARK:
        buf.append("(mark " + this.markUnumSet.toString() + ")");
        break;

      case MARKL_UNUM:
        buf.append("(markl " + this.marklUnumSet.toString() + ")");
        break;

      case MARKL_REGION:
        buf.append("(markl " + this.marklRegion.toString() + ")");
        break;

      case OLINE:
        buf.append("(oline " + this.olineRegion.toString() + ")");
        break;

      case HTYPE:
        buf.append("(htype " + this.htypeInt + ")");
        break;

      case PASS_REGION:
        buf.append("(pass " + this.passRegion.toString() + ")");
        break;

      case PASS_UNUM:
        buf.append("(pass " + this.passUnumSet.toString() + ")");
        break;

      case DRIBBLE:
        buf.append("(dribble " + this.dribbleRegion.toString() + ")");
        break;

      case CLEAR:
        buf.append("(clear " + this.clearRegion.toString() + ")");
        break;

      case TACKLE:
        buf.append("(tackle " + this.tackelUnumSet.toString() + ")");
        break;

      case BTO:
        buf.append("(bto " + this.bto.toString() + ")");
        break;

      case APPROACH_BALL:
        buf.append("(approach_ball)");
        break;

      case SHOOT:
        buf.append("(shoot)");
        break;

      case HOLD:
        buf.append("(hold)");
        break;

      case INTERCEPT:
        buf.append("(intercept)");
        break;

      case NAME:
        buf.append(this.actionName);
        break;
    }

    return buf.toString();
  }

}
